<template>
    <section>
        <!-- 正在进行的列表 -->
        <div class="doList" :todos="todos">
            <div class="title">
                <h2>正在进行</h2>
                <span class="todoCount">{{todos.length}}</span>
            </div>

            <ul class="list">
                <Item v-for="todoObj in todos" :key="todoObj.id" :todo="todoObj" :checkTodo="checkTodo" :deleteTodo="deleteTodo"></Item>
            </ul>
        </div>
    </section>
</template>

<script>
import Item from './Item.vue'
export default {
    name: "List",
    components: { Item },
    props:["todos","checkTodo","deleteTodo","todos"]
}
</script>

<style lang="scss" scoped>
.title {
    width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title h2 {
    margin: 20px 0;
}

.title span {
    padding: 0 5px;
    height: 20px;
    border-radius: 20px;
    background: #e6e6fa;
    line-height: 22px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.list li {
    height: 32px;
    display: flex;
    align-items: center;
    background-color: #fff;
    border-left: 5px solid #629a9c;
    border-radius: 3px;
    margin-bottom: 10px;
}

.list input {
    width: 22px;
    height: 22px;
    margin-left: 20px;
    margin-right: 15px;
    cursor: pointer;
}

.list p {
    flex: 1;
}

.list a {
    width: 12px;
    height: 12px;
    border-radius: 12px;
    border: 6px double #fff;
    margin-right: 10px;
    background: #ccc;
    line-height: 14px;
    text-align: center;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
}

a:hover {
    background-color: red;
}
</style>